package demo11.controller;


import demo11.pojo.User;
import demo11.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class UserController {
    @Autowired
    private UserService userService;
    public void controller(){
        User user =new User();
        user.setId(2020);
        user.setName("tom");
        userService.addUser(user);
    }

}
